Skip to content

Conversation

bhouston
Copy link
Member

@bhouston bhouston commented Mar 6, 2025

Add tokenCache configuration option

Description

This PR adds a new configuration option called tokenCache to control whether token caching is enabled in API calls. The default value is true to maintain current behavior.

When set to false, the CLI bypasses adding cache-control metadata to messages when calling the LLM API.

Changes

  • Added tokenCache: boolean to the configuration schema with a default value of true
  • Modified the ToolContext type to include the tokenCache option
  • Added the tokenCache property to the TokenTracker class
  • Modified toolAgentCore.ts to conditionally apply cache control based on this setting
  • Added a command-line option for tokenCache
  • Updated the README to document the new option

Testing

The implementation has been tested by:

  • Setting the configuration via mycoder config set tokenCache false
  • Verifying that the option is correctly passed to the agent
  • Confirming that when disabled, cache control metadata is not added to messages

Related Issues

Fixes #119

@bhouston bhouston merged commit c157e10 into main Mar 6, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version mycoder-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bhouston bhouston deleted the feature/add-token-cache-option branch March 12, 2025 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tokenCache configuration option

1 participant